
package com.kanjian.music.util;

import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;

public class DialogUtil {

    public static void showDialog(Context context, String title, String msg,
            DialogInterface.OnClickListener leftButtonListener,
            DialogInterface.OnClickListener rightButtonListener) {
        AlertDialog.Builder builder = new AlertDialog.Builder(context);
        builder.setTitle(title);
        builder.setMessage(msg);
        builder.setNegativeButton("取消", rightButtonListener);
        builder.setPositiveButton("确定", leftButtonListener);
        builder.create().show();
    }

}
